package com.archie.xunji.map.entity;

import org.json.JSONObject;

/**
 * Created by Administrator on 2015/11/10.
 */
public class DiscoverResultEntity {

    /**
     * user_type : 1
     * placeid : 67
     * labels : 苏阳,银川,富宁街,摇滚,老银川,乐队
     * userinfoid : 36
     * audiolength : 271
     * placename : 银川富宁街
     * headurl : http://imagecdn.xunjimap.com/image/cms/story/56e91eb7-7c17-4109-916e-5440bcc2f80c.jpg
     * storyid : 93
     * audiourl : http://imagecdn.xunjimap.com/image/cms/audio/70bcfb95-4c7d-49c4-8e91-2b4adc260646.mp3
     * username : 苏阳
     * description : 04年，在《贤良》的大部分歌曲创作出来之后，苏阳在银川富宁街进行了一次集中演出。这场名为“土的声音”的表演，虽然只有简陋的场地，零散的听众，但获得了不错的反响，尤其是“老银川”们的喜爱。而这场获得家乡人民肯定的演出，也让苏阳对《贤良》的成功发行更具信心。
     * placedesc : 银川富宁街
     * longitude : 106.262704
     * latitude : 38.464352
     * imageurl : http://imagecdn.xunjimap.com/image/cms/place/8c30c96b-8836-43b1-a4bd-722f78d5dafb.jpg
     */

    private int user_type;
    private int placeid;
    private String labels;
    private int userinfoid;
    private String audiolength;
    private String placename;
    private String headurl;
    private int storyid;
    private String audiourl;
    private String username;
    private String description;
    private String placedesc;
    private double longitude;
    private double latitude;
    private String imageurl;

    public void setUser_type(int user_type) {
        this.user_type = user_type;
    }

    public void setPlaceid(int placeid) {
        this.placeid = placeid;
    }

    public void setLabels(String labels) {
        this.labels = labels;
    }

    public void setUserinfoid(int userinfoid) {
        this.userinfoid = userinfoid;
    }

    public void setAudiolength(String audiolength) {
        this.audiolength = audiolength;
    }

    public void setPlacename(String placename) {
        this.placename = placename;
    }

    public void setHeadurl(String headurl) {
        this.headurl = headurl;
    }

    public void setStoryid(int storyid) {
        this.storyid = storyid;
    }

    public void setAudiourl(String audiourl) {
        this.audiourl = audiourl;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setPlacedesc(String placedesc) {
        this.placedesc = placedesc;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public void setImageurl(String imageurl) {
        this.imageurl = imageurl;
    }

    public int getUser_type() {
        return user_type;
    }

    public int getPlaceid() {
        return placeid;
    }

    public String getLabels() {
        return labels;
    }

    public int getUserinfoid() {
        return userinfoid;
    }

    public String getAudiolength() {
        return audiolength;
    }

    public String getPlacename() {
        return placename;
    }

    public String getHeadurl() {
        return headurl;
    }

    public int getStoryid() {
        return storyid;
    }

    public String getAudiourl() {
        return audiourl;
    }

    public String getUsername() {
        return username;
    }

    public String getDescription() {
        return description;
    }

    public String getPlacedesc() {
        return placedesc;
    }

    public double getLongitude() {
        return longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public String getImageurl() {
        return imageurl;
    }

    @Override
    public String toString() {
        return "DiscoverResultEntity{" +
                "user_type=" + user_type +
                ", placeid=" + placeid +
                ", labels='" + labels + '\'' +
                ", userinfoid=" + userinfoid +
                ", audiolength='" + audiolength + '\'' +
                ", placename='" + placename + '\'' +
                ", headurl='" + headurl + '\'' +
                ", storyid=" + storyid +
                ", audiourl='" + audiourl + '\'' +
                ", username='" + username + '\'' +
                ", description='" + description + '\'' +
                ", placedesc='" + placedesc + '\'' +
                ", longitude=" + longitude +
                ", latitude=" + latitude +
                ", imageurl='" + imageurl + '\'' +
                '}';
    }

    public  void parseEntity(JSONObject jsonObject){

        user_type = jsonObject.optInt("user_type");
        placeid = jsonObject.optInt("placeid");
        labels = jsonObject.optString("labels");
        userinfoid = jsonObject.optInt("userinfoid");

        audiolength = jsonObject.optString("audiolength");
        placename = jsonObject.optString("placename");
        headurl = jsonObject.optString("headurl");
        storyid = jsonObject.optInt("storyid");
        audiourl = jsonObject.optString("audiourl");

        username = jsonObject.optString("username");
        description = jsonObject.optString("description");
        placedesc = jsonObject.optString("placedesc");
        longitude = jsonObject.optDouble("longitude");
        latitude = jsonObject.optDouble("latitude");

        imageurl = jsonObject.optString("imageurl");
    }
}